import Vue from 'vue'
import Vuex from 'vuex'
import createPersistedState from 'vuex-persistedstate'
import * as Cookies from "js-cookie";
import login from './modules/login'
import loadingUi from './modules/loadingUi'
Vue.use(Vuex)

export default new Vuex.Store({
  modules: {
    login,loadingUi
  },
  plugins: [createPersistedState({
    // storage: {
    //   getItem: (key) => Cookies.get(key),
    //   setItem: (key, value) => Cookies.set(key, value, { expires: 3, secure: true }),
    //   removeItem: (key) => Cookies.remove(key),
    // }
  })]
})
